<template>
  <view class="container">
    <view class="avatar">
      <!-- 上传组件 -->
      <u-upload ref="product_img" name="product_img" :maxCount="6" :fileList="filelist" width="100" height="100"
        @delete="del" @afterRead="read" />
    </view>

    <view class="content">

      <u-form labelPosition="left" :model="info" ref="uForm">



        <u-form-item label="名称">
          <u-input v-model="info.name" placeholder="请输入商品名称" />
        </u-form-item>
        <u-form-item label="品牌">
          <u-input v-model="info.brankname" placeholder="请输入商品品牌" />
        </u-form-item>

        <u-form-item label="编号">
          <u-input v-model="info.code" placeholder="请输入卖家编号" />
        </u-form-item>

        <u-form-item label="价格">
          <u-input v-model="info.price" placeholder="请输入产品价格" />
        </u-form-item>

        <view class="hint">

          <checkbox style="width: 16px; height: 16px;"></checkbox>
          登录代表同意

          <text class="link">奢总汇用户协议、隐私政策，</text>
          并授权使用您的奢总汇点评账号信息（如昵称、头像、收获地址）以便您统一管理
        </view>




        <u-form-item>
          <!-- <u-button type="primary" @click="submitForm">提交</u-button> -->
          <view class="btn">
            <u-button type="primary" @click="goto">提交</u-button>
          </view>


        </u-form-item>
      </u-form>

    </view>
    <u-toast ref="notice"></u-toast>

  </view>
</template>
  
<script>
export default {
  onLoad(option) {
    this.type = option.type ? option.type : ""

  },
  data() {
    return {
      info: {},
      name: '',
      phone: '',
      type: "",
      bankCard: '',
      filelist: [],

    };
  },
  methods: {
    goto() {
      this.$refs.notice.show({
        type: "success",
        message: "提交成功，等待卖家签署协议",
        duration: 1200,
        complete: () => {
          uni.$u.route({
            url: "pages/test/merchant/order"
          })
        }
      })


    }



  }



}
</script>
  
<style lang="scss">
.btn {
  width: 70%;
  margin: 100px auto;
}

.u-form-item__body__left__content__label.data-v-5e7216f1 {
  width: 75px;
}

.content {
  padding: 20px;
}

.container {
  height: 100%;
  margin: 0 50rpx;
  box-sizing: border-box;
}

.avatar {
  text-align: center;
}

.hint {
  padding: 20rpx 40rpx;
  font-size: 20rpx;

  .link {}
}

.u-avatar {
  margin: 80rpx auto 40rpx;
}

.avatar .u-upload {
  justify-content: center;
  align-items: center;
  margin: 3em auto;
}
</style>
  